// pages/http/http.js
const {getBookHttp} = require("../../module/http")
const {transfromStar} = require("../../utils/index")
Page({
  data: {
    book:""
  },

  onLoad:async function (options) {
    var res = await getBookHttp();
    res.data.forEach(item=>{
      item["pf"] = transfromStar(item.rating);
      item["pic"] = item.coverImage;
      this.setData({
        book:res.data
      })
    })
  },
})